package com.xuebang.admin.util;


public class UserAgent {

	private String type;
	private String family;
	private String name;
	private String version;

	private String osFamily;
	private String osName;
	private String osVersion;

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getFamily() {
		return family;
	}

	public void setFamily(String family) {
		this.family = family;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getOsFamily() {
		return osFamily;
	}

	public void setOsFamily(String osFamily) {
		this.osFamily = osFamily;
	}

	public String getOsName() {
		return osName;
	}

	public void setOsName(String osName) {
		this.osName = osName;
	}

	public String getOsVersion() {
		return osVersion;
	}

	public void setOsVersion(String osVersion) {
		this.osVersion = osVersion;
	}
	
	public boolean isFromMobile() {
		return "MOBILE_BROWSER".equals(type);
	}

	@Override
	public String toString() {
		return "UserAgent [type=" + type + ", family=" + family + ", name="
				+ name + ", version=" + version + ", osFamily=" + osFamily
				+ ", osName=" + osName + ", osVersion=" + osVersion + "]";
	}

}
